/*
 * $Id$
 */
package corejs.expr;

import corejs.rt.ActivationRecord;
import corejs.rt.Value;
import corejs.util.XmlPrinter;
import java.util.ArrayList;

/**
 *
 * @author myang
 */
public class SequenceExpr extends ArrayList<Expression> implements Expression {

   public SequenceExpr(final Expression current, final Expression right) {
      add(current);
      if (right instanceof SequenceExpr) {
         for (final Expression e : (SequenceExpr)right) {
            add(e);
         }
      }
      else {
         add(right);
      }
   }

   @Override
   public void print(final XmlPrinter printer) {
   }

   @Override
   public Object eval(ActivationRecord scope) {
      return null;
   }

   @Override
   public Value accept(final ExpressionVisitor visitor) {
      return visitor.visitSequence(this);
   }

   
}
